package com.yihu.yihuds.front.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yihu.cms.action.BaseController;
import com.yihu.web.bean.vo.OrderQuery;
import com.yihu.web.constats.DSConstants;
import com.yihu.yihuds.service.OrderService;

/***
 * 订单管理
 * 
 * @author Aaron
 *
 */
@Controller
public class OrderFrontController extends BaseController {
	@Autowired
	private HttpServletRequest request;
	OrderService service = new OrderService();
	

	@RequestMapping(value = "/front/order/list", method = RequestMethod.GET)
	public @ResponseBody Object getOrders(OrderQuery pQuery) {
		pQuery.setStatus(DSConstants.ORDER_STATE_PAID);
		return service.getOrdersForFront(pQuery);
	}
	
}
